/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package de.hsmannheim.pepa.patientenportal.apanwep.model.impl;

import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.CacheModel;

import de.hsmannheim.pepa.patientenportal.apanwep.model.Event_Types_Codes;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

/**
 * The cache model class for representing Event_Types_Codes in entity cache.
 *
 * @author Cedric Nana
 * @see Event_Types_Codes
 * @generated
 */
public class Event_Types_CodesCacheModel implements CacheModel<Event_Types_Codes>,
	Externalizable {
	@Override
	public String toString() {
		StringBundler sb = new StringBundler(5);

		sb.append("{Messages_ID=");
		sb.append(Messages_ID);
		sb.append(", Eventtypecodes_ID=");
		sb.append(Eventtypecodes_ID);
		sb.append("}");

		return sb.toString();
	}

	@Override
	public Event_Types_Codes toEntityModel() {
		Event_Types_CodesImpl event_Types_CodesImpl = new Event_Types_CodesImpl();

		event_Types_CodesImpl.setMessages_ID(Messages_ID);
		event_Types_CodesImpl.setEventtypecodes_ID(Eventtypecodes_ID);

		event_Types_CodesImpl.resetOriginalValues();

		return event_Types_CodesImpl;
	}

	@Override
	public void readExternal(ObjectInput objectInput) throws IOException {
		Messages_ID = objectInput.readLong();
		Eventtypecodes_ID = objectInput.readLong();
	}

	@Override
	public void writeExternal(ObjectOutput objectOutput)
		throws IOException {
		objectOutput.writeLong(Messages_ID);
		objectOutput.writeLong(Eventtypecodes_ID);
	}

	public long Messages_ID;
	public long Eventtypecodes_ID;
}